import { StrictMode } from 'react';
import { createRoot } from 'react-dom/client';
import { ConfigProvider } from 'antd';
import zhCN from 'antd/locale/zh_CN';
import 'dayjs/locale/zh-cn';

// 先导入 antd 样式
import 'antd/dist/reset.css';
// 再导入全局样式
import '@/styles/global.less';
// 最后导入自定义的 antd 样式覆盖
import '@/styles/antd.less';

import App from './App';

createRoot(document.getElementById('root')!).render(
  <StrictMode>
    <ConfigProvider
      locale={zhCN}
      theme={{
        token: {
          colorPrimary: '#1890ff',
          borderRadius: 4,
          colorLink: '#1890ff',
        },
      }}
    >
      <App />
    </ConfigProvider>
  </StrictMode>,
);
